/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.henryschein.mmvvcc.listener;

import com.henryschein.mmvvcc.slave.DBInizializer;
import com.henryschein.mmvvcc.slave.ServletCont;
import com.henryschein.mmvvcc.slave.WSEndPoint;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 *
 * @author obelog
 */
public class DBInit implements ServletContextListener {

    public void contextInitialized(ServletContextEvent sce) {
        ServletContext sc = sce.getServletContext();
        ServletCont.getInstance().setSc(sc);
        new DBInizializer(sc).init();
        WSEndPoint.start();
    }

    public void contextDestroyed(ServletContextEvent sce) {
    }
    
}
